August 14, 2020
Continuing with matrix, list, array, dataframe creation.. Check this out…
matrix_sample= np.matrix(‘8 5 3; 4 7 2; 9 6 1’)
matrixsample/6
matrixsample*2
matrixsample+1
matrixsample-1
import numpy as np
np.transpose(matrix_sample)
lst = [“India”, 5, 6, 7]
import numpy as np
np.arange(10)
import pandas as pd
dfrme = pd.DataFrame({‘EID’:[3,4,6],‘Gender’:[“M”,“M”,“F”],‘Name’:[“Abi”,“Aki”,“Anu”]})
from ggplot import mtcars
dst = mtcars
dst_subset = dst[[‘cyl’,‘mpg’]]
I had issues while running command which had ggplot, i fixed it by installing separately and doing some config changes. Better you install latest conda version in which you may not get this issue.